<!DOCTYPE html>
<html lang="en" HTML xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>Home</title>
    <link rel="stylesheet" type="text/css" href="css/style.css">
</head>
<body>
<div id="header">
    <div class="header">
        <ul>
            <li class="selected">
                <a href="index.html">home</a>
            </li>
            <li>
                <a href="about.html">about</a>
            </li>
            <li>
                <a href="blog.html">blog</a>
            </li>
            <li>
                <a href="shows.html">shows</a>
            </li>
        </ul>
    </div>
    <div class="body">
        <h4>pxiel Game </h4>
    </div>
</div>
<div id="body">
    <br>
    <div class="content">
        <div class="column" th:each="post:${session.posts}">
            <div class="left">
                <img th:src="${post.pictrue}"></img>
            </div>
            <div  class="right">
                <div class="user">
                    <div  class="touxiang" >
                        <img th:src="${post.getPuser().picurl}"></img>
                    </div>
                    <a href="3.html">
                        <div class="username" th:text="${post.getPuser().name}"></div>
                    </a>
                </div>
                <a th:href="@{|/postpage/${post.id}|}">
                    <div class="pbox">
                        <p th:text="${post.title}">

                        </p>
                    </div>
                </a>
            </div>
        </div>
        <br>
    </div>

    <div class="sidebar">
        <div  class="userdata">
            <div class="touxiang"  ><img th:src="${session.user.picurl}" class="imgsize"></div>
            <div class="data">
                <p th:text="${session.user.name}" ></p>
                <p th:text="${session.user.address}" ></p>
                <p th:text="${session.user.signatrue}" ></p>
            </div>
        </div>
        <div class="chose">
            <a href = "JavaScript:void(0)" onclick = "openDialog()">发帖</a>
            <div id="light"  class="fatie">

                <a href = "javascript:void(0)" onclick = "closeDialog()">close</a>
                <form th:action="@{/fatie}">
                    <input type="text" name="title" class="acc" placeholder="主题">
                    <textarea  class="acc-textarea" name="content" placeholder="内容"></textarea>
                    <button type="submit">提交</button>
                </form>
            </div>
            <a th:href="@{/pinglunuser}">评论</a>
        </div>
        <div class="favolan">
            <div class="lan"></div>
            <span>FAVOURITE</span>
        </div>
    </div>
</div>
<div id="footer">
    <p>
        &copy; Copyright &copy; 2022.jiajia All rights reserved.
    </p>
</div>
<div style="display:none"><script src='http://v7.cnzz.com/stat.php?id=155540&web_id=155540' language='JavaScript' charset='gb2312'></script></div>
<script type="text/javascript">
    function openDialog(){
        document.getElementById('light').style.display='block';
    }
    function closeDialog(){
        document.getElementById('light').style.display='none';
    }
</script>


</body>
</html>